package com.sinosoft.bee.services.consumer.config;

import com.netflix.client.config.IClientConfig;
import com.netflix.loadbalancer.ILoadBalancer;
import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RoundRobinRule;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author:TobbyQuinn
 * @date:2018/4/25
 * @project:bee
 **/
//@Configuration
public class RoundRuleOfRibbon {

    /**
     * 实际不生效。。
     * @param iLoadBalancer
     * @return
     */
    @Bean
    public IRule iRule(ILoadBalancer iLoadBalancer){
        return new RoundRobinRule();
    }
}
